package com.mingqijia.gassafety.shared.constant;

/**
 * 设备类型
 * @author solyutian
 * @date 2023/6/27 09:59
 */
public enum ConsoleSkDeviceTypeEnum {
  SOS(1,"SOS报警器"),
  SOAK(2,"水浸报警器"),
  SMOKE(3,"烟雾报警器"),
  SMART_DOOR_LOCK(4,"智能门锁")
  ;

  private static final ConsoleSkDeviceTypeEnum[] VALUES = ConsoleSkDeviceTypeEnum.values();


  public static String getTypeByCode(Integer code){
    for (ConsoleSkDeviceTypeEnum c : VALUES){
      if (code.equals(c.getCode())){
        return c.type;
      }
    }
    return "";
  }


  private Integer code;
  private String type;

  ConsoleSkDeviceTypeEnum(Integer code, String type) {
    this.code = code;
    this.type = type;
  }

  public static ConsoleSkDeviceTypeEnum[] getVALUES() {
    return VALUES;
  }

  public Integer getCode() {
    return code;
  }

  public void setCode(Integer code) {
    this.code = code;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }
}
